package com.udf.common;

import java.util.Date;

public  class Alert {
        public Integer playerId;
        public Double totalWin;
        public String tableName;

        // 必须包含空构造函数
        public Alert() {}

        public Alert(Integer playerId, Double totalWin, String tableName) {
            this.playerId = playerId;
            this.totalWin = totalWin;
            this.tableName = tableName;
        }

        @Override
        public String toString() {
            return String.format(
                    "Player %d won $%.2f at table %s [%s]",
                    playerId, totalWin, tableName, new Date()
            );
        }

    public Integer getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Integer playerId) {
        this.playerId = playerId;
    }

    public Double getTotalWin() {
        return totalWin;
    }

    public void setTotalWin(Double totalWin) {
        this.totalWin = totalWin;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
}


